// pages/index/function/pay/pay-done-detail/pay-done-detail.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    goodsItem: [{
      goodsId: "0",
      goodsName: "薯片",
      goodsImage: "../../../../../../image/timg.jpg",
      quantity: 5,
      retailPrice: 10
    },
    {
      goodsId: "1",
      goodsName: "浪味仙贝",
      goodsImage: "../../../../../../image/timg.jpg",
      quantity: 3,
      retailPrice: 25
    },
  ],
    totalPrice: 366,
    realPrice: 366,
    discount: 0,
    payId: 2,//先假设是现金支付
    currentPrice:366,
    payType:""
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this;
    var payType;
    if (that.data.payId == 0) {
      payType = "微信"
    }
    if (that.data.payId == 1) {
     payType = "支付宝"
    }
    if (that.data.payId == 2) {
      payType = "现金"
    }
  this.setData({
    payType:payType
  })
  },
goIndex(e){
  //跳回收款页
  wx.navigateTo({
    url: '../pay-scan/pay-scan',
  })

},
  
})